home *** CD-ROM | disk | FTP | other *** search
/ Pro One: Netcracker Netscape Navigator / ProOne: Netcracker Netscape Navigator.iso / pc / nc / nct06010.geo / 00059.ls < prev    next >
Encoding:
Text File  |  1997-03-19  |  3.9 KB  |  177 lines

  1. on startMovie
  2.   global theLocalTime
  3.   set theLocalTime to 0
  4.   Set_CDcounter(2)
  5.   initLesson()
  6.   CheckForTagWd()
  7. end
  8.  
  9. on HideLastStep
  10.   unLoadCast()
  11.   RestoreHilites()
  12. end
  13.  
  14. on TheinitCursor
  15.   initCursorCastNum()
  16.   initCursorList(1)
  17.   set CursorCastNum to getCursor(2)
  18.   cursor([CursorCastNum, CursorCastNum + 1])
  19. end
  20.  
  21. on checkScreenStatus
  22.   CheckRollOver()
  23.   CheckSnakeStatus()
  24.   go(the frame)
  25. end
  26.  
  27. on BlinkNext
  28.   if (the timer > getTimer()) and not soundBusy(2) then
  29.     startTimer()
  30.     if the name of cast the castNum of sprite get_NEXTSprite() = "NEXT" then
  31.       set the castNum of sprite get_NEXTSprite() to the number of cast "NEXT_E"
  32.     else
  33.       set the castNum of sprite get_NEXTSprite() to the number of cast "NEXT"
  34.     end if
  35.   end if
  36. end
  37.  
  38. on GoNext
  39.   if not get_Disabled() then
  40.     sound stop 2
  41.     if Get_NEXT() = 9 then
  42.       GoNextMovie()
  43.     else
  44.       go("t" & Get_NEXT())
  45.     end if
  46.     Set_NEXT(Get_NEXT() + 1)
  47.   end if
  48. end
  49.  
  50. on playTheTSound theTSnd
  51.   PlaySound("NCT06010.s0" & theTSnd)
  52. end
  53.  
  54. on stopMovie
  55.   sound stop 1
  56.   unLoad()
  57.   setEmptyCursor()
  58. end
  59.  
  60. on GoNextMovie
  61.   PlaySound("GOSOUND.SO1")
  62.   SaveHilite()
  63.   Add_CDcounter(1)
  64.   set cdNum to Get_CDcounter()
  65.   set movieName to item cdNum of Get_CurrentSnakeScreens()
  66.   go("INIT" & Get_ScreenSubject(), movieName & ".GEO")
  67. end
  68.  
  69. on visLamp bool
  70.   set the visible of sprite 33 to bool
  71.   set the visible of sprite 34 to bool
  72. end
  73.  
  74. on InitLamp
  75.   visLamp(0)
  76.   UpdateCursors(34, 0)
  77.   set the castNum of sprite 32 to the number of cast "lamp_Off"
  78.   UpdateCursors(32, 3)
  79. end
  80.  
  81. on unSetMouseEvents
  82.   global puppetList
  83.   set puppetList to []
  84.   repeat with i = 1 to 48
  85.     add(puppetList, the puppet of sprite i)
  86.     if not (the puppet of sprite i) then
  87.       set the puppet of sprite i to 1
  88.     end if
  89.   end repeat
  90.   play frame "outLamp"
  91. end
  92.  
  93. on setMouseEvents
  94.   global puppetList
  95.   set the mouseDownScript to EMPTY
  96.   set the mouseUpScript to EMPTY
  97.   repeat with i = 1 to 48
  98.     if getAt(puppetList, i) = 0 then
  99.       set the puppet of sprite i to 0
  100.     end if
  101.   end repeat
  102.   play done
  103. end
  104.  
  105. on dont
  106.   dontPassEvent()
  107. end
  108.  
  109. on HandleLamp
  110.   sound stop 1
  111.   sound stop 2
  112.   if the name of cast the castNum of sprite 32 = "lamp_On" then
  113.     set the castNum of sprite 32 to the number of cast "lamp_Off"
  114.     set the visible of sprite 33 to 0
  115.     set the visible of sprite 34 to 0
  116.     UpdateCursors(34, 0)
  117.     set the castNum of sprite 34 to the number of cast "EXITLAMP"
  118.     updateStage()
  119.     unSetMouseEvents()
  120.   else
  121.     set the castNum of sprite 32 to the number of cast "lamp_On"
  122.     UpdateCursors(34, 3)
  123.     set the visible of sprite 33 to 1
  124.     set the visible of sprite 34 to 1
  125.     updateStage()
  126.     PlaySound("NCT06010.T01")
  127.     displayTip(34)
  128.   end if
  129.   updateStage()
  130. end
  131.  
  132. on displayTip theExitBtnSp
  133.   global exitTheLoop
  134.   set exitTheLoop to 0
  135.   set the mouseDownScript to "dont"
  136.   set the mouseUpScript to "dont"
  137.   set the exitLock to 0
  138.   repeat while not exitTheLoop
  139.     if the mouseCast = the number of cast "EXITLAMP" then
  140.       set the cursor of sprite 48 to [404, 405]
  141.     else
  142.       set the cursor of sprite 48 to [400, 401]
  143.     end if
  144.     if the mouseDown and (the mouseCast = the number of cast "EXITLAMP") then
  145.       switchExitLampButt(theExitBtnSp, "EXITLAMP_D")
  146.     end if
  147.   end repeat
  148.   set the exitLock to 1
  149.   set the cursor of sprite 48 to 0
  150.   HandleLamp()
  151. end
  152.  
  153. on switchExitLampButt spriteNum, castDown
  154.   global exitTheLoop
  155.   set flag to 0
  156.   set SaveCast to the castNum of sprite spriteNum
  157.   set flag to swapExitLampCast(spriteNum, SaveCast, castDown)
  158.   repeat while the mouseDown
  159.     set flag to swapExitLampCast(spriteNum, SaveCast, castDown)
  160.   end repeat
  161.   if flag = 1 then
  162.     set exitTheLoop to 1
  163.   end if
  164. end
  165.  
  166. on swapExitLampCast spriteNum, SaveCast, castDown
  167.   if rollOver(spriteNum) then
  168.     set the castNum of sprite spriteNum to the number of cast castDown
  169.     updateStage()
  170.     return 1
  171.   else
  172.     set the castNum of sprite spriteNum to the number of cast SaveCast
  173.     updateStage()
  174.     return 0
  175.   end if
  176. end
  177.